import datetime

from src.utils.Tools import *


def get_member_add_delateDays(monthNum):
    """
    获取会员增加天数
    """
    today = datetime.datetime.today()
    deltaDays = 0
    for i in range(monthNum):
        target_month = (today.month + i) % 12
        if target_month == 0:
            target_month = 12
        targetDate = datetime.datetime(year=today.year, month=target_month, day=today.day)
        print("month:{} days:{}".format(target_month, month_day(targetDate)))
        deltaDays += month_day(targetDate)
    return datetime.timedelta(days=deltaDays)


if __name__ == '__main__':
    print(get_member_add_delateDays(12))
